- title @account.name

!= render :partial => 'generic_account_info'

%h2.divider
  Latest activity across your backlogs
- if @backlogs.empty?
  %p
    - if can? :read
      There are no backlogs in this account yet.
    - else # assume user does not have access to backlogs but there may be backlogs that exist not for this user
      You do not have access to any backlogs in this account.
- else
  - @backlogs.group_by { |backlog| backlog.company.present? ? backlog.company : backlog.account }.each do |company_or_account, backlogs|
    .dash-board-company
      = company_or_account_header company_or_account, 60
    %ul.backlog-list
      - backlogs.each do |backlog|
        %li
          .name
            = link_to truncate(backlog.name, :length => 40), account_backlog_path(backlog.account, backlog)
          .last-update= "last updated #{time_ago_in_words(backlog.updated_at)} ago by #{backlog.last_modified_user.name}"
          - if backlogs.length == 1 && backlog.name =~ /^Example.*backlog$/
            = render :partial => '/accounts/first_project_bubble'

- if can? :full
  = link_to "Create a new backlog", new_account_backlog_path(@account), { :class => 'button' }